package com.eco.fanliapp.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.eco.fanliapp.entity.SyUserIntegralRecord;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-12-24
 */
public interface SyUserIntegralRecordMapper extends BaseMapper<SyUserIntegralRecord> {

    /**
     * 根据订单id查询兑换记录数量
     * @param orderId
     * @return
     */
    Integer selectIntegralRecordByOrderId(Long orderId);

    List<SyUserIntegralRecord> userIntegralRecordList(HashMap<String,Object> params);


    List<SyUserIntegralRecord> selectIntegralRecordList(@Param("userId") Long userId, @Param("type")Integer type, @Param("star")Integer star, @Param("end") Integer end);

    List<SyUserIntegralRecord> selectByUserId(Long userId);
}
